package com.beta.admin.support.web;

import com.beta.common.web.AbstractBaseController;
import com.beta.entity.Admins;
import org.apache.shiro.SecurityUtils;

/**
 * Created by vector on 2017/1/1.
 */
public class BaseController extends AbstractBaseController {

    protected Admins getCurrentAdmin() {
        return (Admins) SecurityUtils.getSubject().getPrincipal();
    }

    protected boolean hasRole(String role) {
        return SecurityUtils.getSubject().hasRole(role);
    }

}
